cmake_minimum_required(VERSION 2.6)

FIND_PATH(ZMQ_HOME zmq.h /usr/local/include NO_DEFAULT_PATH)
FIND_PATH(CZMQ_HOME czmq.h /usr/local/include NO_DEFAULT_PATH)
FIND_PATH(TINYLOG_HOME tinylog.h ../vendor/tinylog/ NO_DEFAULT_PATH)
FIND_PATH(PUBLIC_HOME patronus_public.h ../public/ NO_DEFAULT_PATH)
#FIND_LIBRARY(ZMQ_LIB libzmq.so /usr/lib/ /usr/lib64/ /usr/local/lib/ NO_DEFAULT_PATH)


INCLUDE_DIRECTORIES(${CZMQ_HOME} ${PUBLIC_HOME} ${TINYLOG_HOME})
LINK_DIRECTORIES(/usr/local/lib/)

ADD_DEFINITIONS(
 -g -W -Wall
)

SET(APP_TARGE ybworker)

SET(
	SRC_LIST 
	src/ybworker.c
	${TINYLOG_HOME}/tinylog.c
)

SET(
	LIBRARY_LIST 
	libczmq.so
)

add_executable(${APP_TARGE} ${SRC_LIST})
TARGET_LINK_LIBRARIES(${APP_TARGE} libczmq.so)
